package com.easy.query.core.proxy.core.tuple.proxy;

import com.easy.query.core.proxy.PropTypeColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.columns.SQLAnyColumn;
import com.easy.query.core.proxy.columns.types.SQLAnyTypeColumn;
import com.easy.query.core.proxy.core.draft.proxy.AbstractDraftProxy;
import com.easy.query.core.proxy.core.tuple.Tuple8;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.util.EasyObjectUtil;

import java.util.Optional;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 *
 * @author xuejiaming
 */
public class Tuple8Proxy<T1,T2,T3,T4,T5,T6,T7,T8> extends AbstractDraftProxy<Tuple8Proxy<T1,T2,T3,T4,T5,T6,T7,T8>, Tuple8<T1,T2,T3,T4,T5,T6,T7,T8>> {

    private static final Class<Tuple8> entityClass = Tuple8.class;

    public Tuple8Proxy(PropTypeColumn<T1> column1, PropTypeColumn<T2> column2, PropTypeColumn<T3> column3,
                       PropTypeColumn<T4> column4, PropTypeColumn<T5> column5, PropTypeColumn<T6> column6,
                       PropTypeColumn<T7> column7, PropTypeColumn<T8> column8) {
        super(8);
        fetch(0, column1, "value1");
        fetch(1, column2, "value2");
        fetch(2, column3, "value3");
        fetch(3, column4, "value4");
        fetch(4, column5, "value5");
        fetch(5, column6, "value6");
        fetch(6, column7, "value7");
        fetch(7, column8, "value8");
    }

    /**
     * {@link Tuple8#getValue1}
     */
    public SQLAnyTypeColumn<Tuple8Proxy<T1,T2,T3,T4,T5,T6,T7,T8>, T1> value1() {
        return getAnyTypeColumn("value1",EasyObjectUtil.typeCastNullable(Optional.ofNullable(getDraftPropTypes()[0]).map(o->o.getPropertyType()).orElse(null)));
    }

    /**
     * {@link Tuple8#getValue2()}
     */
    public SQLAnyTypeColumn<Tuple8Proxy<T1,T2,T3,T4,T5,T6,T7,T8>, T2> value2() {
        return getAnyTypeColumn("value2",EasyObjectUtil.typeCastNullable(Optional.ofNullable(getDraftPropTypes()[1]).map(o->o.getPropertyType()).orElse(null)));
    }
    /**
     * {@link Tuple8#getValue3()}
     */
    public SQLAnyTypeColumn<Tuple8Proxy<T1,T2,T3,T4,T5,T6,T7,T8>, T3> value3() {
        return getAnyTypeColumn("value3",EasyObjectUtil.typeCastNullable(Optional.ofNullable(getDraftPropTypes()[2]).map(o->o.getPropertyType()).orElse(null)));
    }
    /**
     * {@link Tuple8#getValue4()}
     */
    public SQLAnyTypeColumn<Tuple8Proxy<T1,T2,T3,T4,T5,T6,T7,T8>, T4> value4() {
        return getAnyTypeColumn("value4",EasyObjectUtil.typeCastNullable(Optional.ofNullable(getDraftPropTypes()[3]).map(o->o.getPropertyType()).orElse(null)));
    }
    /**
     * {@link Tuple8#getValue5()}
     */
    public SQLAnyTypeColumn<Tuple8Proxy<T1,T2,T3,T4,T5,T6,T7,T8>, T5> value5() {
        return getAnyTypeColumn("value5",EasyObjectUtil.typeCastNullable(Optional.ofNullable(getDraftPropTypes()[4]).map(o->o.getPropertyType()).orElse(null)));
    }
    /**
     * {@link Tuple8#getValue6()}
     */
    public SQLAnyTypeColumn<Tuple8Proxy<T1,T2,T3,T4,T5,T6,T7,T8>, T6> value6() {
        return getAnyTypeColumn("value6",EasyObjectUtil.typeCastNullable(Optional.ofNullable(getDraftPropTypes()[5]).map(o->o.getPropertyType()).orElse(null)));
    }
    /**
     * {@link Tuple8#getValue7()}
     */
    public SQLAnyTypeColumn<Tuple8Proxy<T1,T2,T3,T4,T5,T6,T7,T8>, T7> value7() {
        return getAnyTypeColumn("value7",EasyObjectUtil.typeCastNullable(Optional.ofNullable(getDraftPropTypes()[6]).map(o->o.getPropertyType()).orElse(null)));
    }
    /**
     * {@link Tuple8#getValue8()}
     */
    public SQLAnyTypeColumn<Tuple8Proxy<T1,T2,T3,T4,T5,T6,T7,T8>, T8> value8() {
        return getAnyTypeColumn("value8",EasyObjectUtil.typeCastNullable(Optional.ofNullable(getDraftPropTypes()[7]).map(o->o.getPropertyType()).orElse(null)));
    }


    @Override
    public Class<Tuple8<T1,T2,T3,T4,T5,T6,T7,T8>> getEntityClass() {
        return EasyObjectUtil.typeCastNullable(entityClass);
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public Tuple8ProxyFetcher<T1,T2,T3,T4,T5,T6,T7,T8> FETCHER = new Tuple8ProxyFetcher<>(this, null, SQLSelectAsExpression.empty);


    public static class Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> extends AbstractFetcher<Tuple8Proxy<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8>, Tuple8<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8>, Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8>> {

        public Tuple8ProxyFetcher(Tuple8Proxy<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> proxy, Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link Tuple8#getValue1}
         */
        public Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> value1() {
            return add(getProxy().value1());
        }


        /**
         * {@link Tuple8#getValue2}
         */
        public Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> value2() {
            return add(getProxy().value2());
        }
        /**
         * {@link Tuple8#getValue3}
         */
        public Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> value3() {
            return add(getProxy().value3());
        }
        /**
         * {@link Tuple8#getValue4}
         */
        public Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> value4() {
            return add(getProxy().value4());
        }
        /**
         * {@link Tuple8#getValue5}
         */
        public Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> value5() {
            return add(getProxy().value5());
        }
        /**
         * {@link Tuple8#getValue6}
         */
        public Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> value6() {
            return add(getProxy().value6());
        }
        /**
         * {@link Tuple8#getValue7}
         */
        public Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> value7() {
            return add(getProxy().value7());
        }
        /**
         * {@link Tuple8#getValue8}
         */
        public Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> value8() {
            return add(getProxy().value8());
        }


        @Override
        protected Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> createFetcher(
                Tuple8Proxy<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8> cp,
                AbstractFetcher<Tuple8Proxy<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8>, Tuple8<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8>, Tuple8ProxyFetcher<TF1,TF2,TF3,TF4,TF5,TF6,TF7,TF8>> prev,
                SQLSelectAsExpression sqlSelectExpression
        ) {
            return new Tuple8ProxyFetcher<>(cp, this, sqlSelectExpression);
        }
    }

}
